package com.company.cloud.oss.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.oss.modules.api.fallback.OssClientServiceFallbackFactory;
import com.company.cloud.oss.modules.api.req.*;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.io.IOException;

@FeignClient(contextId="oss", name = ServiceNameConstant.basic_center, fallbackFactory = OssClientServiceFallbackFactory.class )
public interface OssRemoteService {


	/**
	 * 文件上传
	 */
	@RequestMapping(value = "/remote/oss/uploadInputStream", method = RequestMethod.POST)
	public BaseClientResult<String> uploadInputStream(@RequestBody UploadInputStreamParam param);

	/**
	 * 文件上传
	 */
	@RequestMapping(value = "/remote/oss/uploadByte", method = RequestMethod.POST)
	public BaseClientResult<String> uploadByte(@RequestBody UploadByteParam param);

	/**
	 * 文件上传
	 */
	@RequestMapping(value = "/remote/oss/uploadBase64", method = RequestMethod.POST)
	public BaseClientResult<String> uploadBase64(@RequestBody UploadBase64Param param);


	/**
	 * 文件上传
	 */
	@RequestMapping(value = "/remote/oss/uploadSuffix", method = RequestMethod.POST)
	public BaseClientResult<String> uploadSuffix(@RequestBody UploadSuffixParam param);
}
